local m = require('utils.vim')

-- Thanks:https://stackoverflow.com/questions/59335220/vim-search-word-under-cursor-not-or
-- Thanks:https://superuser.com/questions/41378/how-to-search-for-selected-text-in-vim
-- m.cmd([[
--     nnoremap zn :let @/='\V\<'.escape(expand('<cword>'), '\').'\>'<cr>:set hls<cr>
--     vnoremap zn y/\V<C-R>=escape(@",'/\')<CR>
-- ]])
m.map('n', 'zn', ':let @/=\'\\V\\<\'.escape(expand(\'<cword>\'), \'\\\').\'\\>\'<cr>:set hls<cr>', { noremap = true, desc='Search word under cursor' })
m.map('v', 'zn', 'y/\\V<C-R>=escape(@\",\'/\\\')<CR>', { noremap = true, desc='Search word under cursor' })

-- EOP
